The invention relates generally to a fault tolerant task dispatcher.
Embedded controllers are a general class of micro controllers used to support original equipment manufacturer (OEM) specific hardware and software. Typically used in mobile computing platforms (e.g., notebook computers), micro controllers process signals to and from a variety of OEM devices such as keyboards, pointing devices, and thermal management systems. Modem micro controllers are single chip computers that include a central processing unit, read only memory, random access memory, communication ports, digital-to-analog and analog-to-digital converters, and a relatively large number of input-output ports. One function of a microcontroller is to off-load the computational resources (e.g., processor time) used to service an OEM device (e.g., a keyboard) from a computer system's host processor. One way a microcontroller provides this capability is through the execution of a series of device service routines known as a tasks. As shown in Table ZZ, a microcontroller continually executes a single thread wherein a watchdog timer (coupled to generate a microcontroller hardware reset operation when it expires) is repeatably reset while waiting for a device service routine to indicate it has completed. This approach may detect a hardware fault (e.g., microcontroller failing to execute any instructions), but would not detect if a device service routine (or the device itself) has failed.
TABLE ZZ One Method of Processing Tasks Task_Code_Label: : Reload Watchdog Timer : Check for Event from device-N Loop at Task_Code_Label Until Event
Another way a microcontroller may off-load a host processor is shown in Table YY. In this approach, a multi-threaded environment allows a dispatcher thread and a task thread to execute separately from one another. The dispatcher thread schedules the execution of each device service routine in a round robin fashion, and is invoked every time a dispatch timer expires. When invoked, the dispatcher reloads a watchdog timer and then returns control to a specified task thread. The task thread loops waiting for its associated service routine to complete. As in the prior example, this approach would not detect if a device service routine (or the device itself) has failed.
TABLE YY Another Method of Processing Tasks Dispatcher: : Reload Watchdog Timer : Return to Task Execution Task_Code_Label : Check for Event from device-N Loop at Task_Code_Label Until Event
As evidenced by the preceding examples, a problem in many micro controllers is that if one task fails to terminate, the microcontroller becomes incapable of executing any further instructions (i.e., it is "hung"). This type of failure can force an end-user to power cycle the entire computer system (of which the microcontroller is but one component) in order to place it back into an operational state. Accordingly, there is a need for a dispatcher routine that is tolerant of one or more faults.